//
//  SearchTableViewCell.m
//  艾听歌
//
//  Created by dllo on 16/5/31.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "SearchTableViewCell.h"

@implementation SearchTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imgView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imgView];
        self.name = [[UILabel alloc] init];
        self.name.font = [UIFont systemFontOfSize:20];
        [self.contentView addSubview:self.name];
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.imgView.frame = CGRectMake(25, 5, self.contentView.frame.size.height - 10, self.contentView.frame.size.height - 10);
    self.imgView.layer.cornerRadius = self.imgView.frame.size.width / 2.0;
    self.imgView.clipsToBounds = YES;
    self.name.frame = CGRectMake(self.imgView.frame.origin.x + self.imgView.frame.size.width + 30, 0, 200, self.contentView.frame.size.height);
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
